package com.lh.java.basic.threadlocal;



public class TestWaitMethodTime {
	public static void main(String[] args) {
		final Object t = new Object();
		for(int i=0;i<5;i++){
			new Thread(new Runnable() {				
				@Override
				public void run() {
					synchronized (t) {
						try {
							System.out.println(Thread.currentThread().getName()+" wait.");
							t.wait(6000);
							System.out.println(Thread.currentThread().getName()+" wait over.");
						} catch (InterruptedException e) {
							e.printStackTrace();
						}
					}
					
				}
			},""+i).start();
		}
		

	}

}
